import { Button, Tooltip, message } from "antd";
import { WechatOutlined } from "@ant-design/icons";

export default function App() {
  const [messageApi, contextHolder] = message.useMessage();

  const handleClick = () => {
    messageApi.open({
      type: "success", // 成功提示
      content: "提示内容~~~~", // 提示内容
    });
  };

  return (
    <div style={{ marginTop: 50 }}>
      {contextHolder}
      <Button type="primary" icon={<WechatOutlined />} onClick={handleClick}>
        经典按钮
      </Button>
      <Tooltip placement="top" title="提示文字~~~">
        <Button type="link">链接按钮</Button>
      </Tooltip>
    </div>
  );
}
